package com.industrial.premu.service.impl;

import com.industrial.premu.domain.PreMuPassword;
import com.industrial.premu.mapper.PreMuPasswordMapper;
import com.industrial.premu.service.IPremuPasswordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PreMuPasswordServiceImpl implements IPremuPasswordService {

    @Autowired
    private PreMuPasswordMapper preMuPasswordMapper;

    @Override
    public PreMuPassword getbyPassWord(String passWord) {

        return preMuPasswordMapper.getbyPassWord(passWord);
    }
    /**
     * 查询导入密码
     *
     * @param baseId 导入密码主键
     * @return 导入密码
     */
    @Override
    public PreMuPassword selectPreMuPasswordByBaseId(String baseId)
    {
        return preMuPasswordMapper.selectPreMuPasswordByBaseId(baseId);
    }

    /**
     * 查询导入密码列表
     *
     * @param preMuPassword 导入密码
     * @return 导入密码
     */
    @Override
    public List<PreMuPassword> selectPreMuPasswordList(PreMuPassword preMuPassword)
    {
        return preMuPasswordMapper.selectPreMuPasswordList(preMuPassword);
    }

    /**
     * 新增导入密码
     *
     * @param preMuPassword 导入密码
     * @return 结果
     */
    @Override
    public int insertPreMuPassword(PreMuPassword preMuPassword)
    {
        return preMuPasswordMapper.insertPreMuPassword(preMuPassword);
    }

    /**
     * 修改导入密码
     *
     * @param preMuPassword 导入密码
     * @return 结果
     */
    @Override
    public int updatePreMuPassword(PreMuPassword preMuPassword)
    {
        return preMuPasswordMapper.updatePreMuPassword(preMuPassword);
    }

    /**
     * 批量删除导入密码
     *
     * @param baseIds 需要删除的导入密码主键
     * @return 结果
     */
    @Override
    public int deletePreMuPasswordByBaseIds(String[] baseIds)
    {
        return preMuPasswordMapper.deletePreMuPasswordByBaseIds(baseIds);
    }

    /**
     * 删除导入密码信息
     *
     * @param baseId 导入密码主键
     * @return 结果
     */
    @Override
    public int deletePreMuPasswordByBaseId(String baseId)
    {
        return preMuPasswordMapper.deletePreMuPasswordByBaseId(baseId);
    }

    @Override
    public PreMuPassword selectByOldPassWord(String oldPassWord) {
        return preMuPasswordMapper.selectByOldPassWord(oldPassWord);
    }
}
